<#include '/admin/header.html' >
<script type="text/javascript">
$(function() {
	
	
	$(".seeting_input .contentTab>ul>li").click(function() {
		var tabid = $(this).attr("tabid");
		$(".seeting_input .contentTab>ul>li").removeClass("contentTabS");
		$(this).addClass("contentTabS");
		$(".tab-page .tab-panel").hide();
		$(".tab-panel[tabid=" + tabid + "]").show();
	});
	$("#saveSetting").click(function() {
		$.Loading.show("正在保存，请稍后");
		var savebtn = $("#saveSetting");
		var disabled = savebtn.hasClass("l-btn-disabled");
		if (!disabled) {
			$("#saveSetting").linkbutton("disable");
			var options = {
				url : "",
				type : "POST",
				dataType : 'json',
				success : function(result) {
					if (result.result == 1) {
						$.Loading.success(result.message);
						
					}else{
						$.Loading.error(result.message);
					}
					$("#saveSetting").linkbutton("enable");
				},
				error : function(e) {
					$.Loading.error("出现错误 ，请重试");
					$("#saveSetting").linkbutton("enable");
				}
			};
			$('#settingForm').ajaxSubmit(options);
		}else{
			$.Loading.hide();
			$("#saveSetting").linkbutton("enable");
		}
	});
});
</script>

<div class="main">
			<div style="display: block;" class="seeting_input"> 
				<div class="tab-bar" style="position: relative;">
					<div class="contentTab" style="background-color: transparent;">
						<ul class="tab">
							<#list tabs as tab>
							<li tabid="${tab.order}"<#if tab.order==0> class="contentTabS"</#if> >
								${tab.tabTitle}
							</li>
							</#list>
						</ul>
					</div>
				</div>
				<div >
					<div class="tab-page" style="background-color: white;">
						<#list htmls as html>
						<div tabid="${html.order}"<#if html.order!=0> style="display:none"</#if> class="tab-panel">
							${html.tabHtml}
						</div>
						</#list>
					</div>
				</div>
				
			</div>
</div>

<script type="text/javascript">
	//显示第一个tab标签
	$(".seeting_input .contentTab>ul>li").addClass("contentTabS");
	$(".tab-panel").first().show();
</script>

<#include '/admin/footer.html' >
